package com.itheima.String;

import java.util.Scanner;

public class PhoneNum {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入手机号:");
        String num = sc.nextLine();
        //含头不含尾
        String start = num.substring(0,3);

        //如果想要最后面几位就用对象.length()再减去想截取的几位.

        String end = num.substring(num.length()-4);
        System.out.println(start + "****" + end);

    }

}
